using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Text.RegularExpressions;
using System.Data;
using System.IO;
namespace Test {
	class MqMsg300050 {
		static void MainX() {
			string[] lines=File.ReadAllLines("MqSrv.txt");
			foreach(string line in lines)
			{
				string[] arr=line.Split(',');
				SQL sql=new SQL(arr[0],arr[1]);
				//DataTable tab=sql.Query("select Number,count(*)[count] from mqMessage(nolock) group by Number");
				//DataTable tab=sql.Query("select * from mqMessage(nolock) where Number='300050' and inserted>getdate()-1 order by id desc");
				DataTable tab=sql.Query("select * from mqMessage(nolock) where Number='300128' and inserted>getdate()-1 order by id desc");
				if(tab.Rows.Count>0)
					Console.WriteLine(arr[0]+","+arr[1]);
				foreach(DataRow row in tab.Rows)
					Console.WriteLine(row[1]+":"+row[5]);
			}
		}
	}
}
